﻿using System.Web.Mvc;
using System.Web.Routing;
using Inovout.Web;

namespace Inovout.YunYao.Solutions.Web
{
    public class MvcApplication : WebApplication
    {
        //改路由，增加{solutioncode}
        //改Binder，自动加载Solution对象
        protected override void RegisterApplicationRoutes(RouteCollection routes)
        {
            routes.MapRoute(
            name: "Solution",
            url: "{solution}/{controller}/{action}/{id}",
            defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional },
            constraints: new { solution = @"\d+" }
            );
        }

    }
}